﻿<Controls:ControlBase x:Class="TS3ServerManager.Controls.ConnectionAreaControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:Controls="clr-namespace:TS3ServerManager.Controls" mc:Ignorable="d" 
             d:DesignHeight="500" d:DesignWidth="150">
    <Grid Width="Auto">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <GroupBox Grid.Row="0" Header="Servers" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
            <ListBox Name="ServerListBox" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MouseDoubleClick="ServerListBox_MouseDoubleClick">
                <ListBox.ContextMenu>
                    <ContextMenu Name="ServerListBoxContextMenu" Opened="ServerListBoxContextMenu_Opened">
                        <MenuItem Header="Connect" Name="ConnectServerContextMenuItem" Click="ConnectServerContextMenuItem_Click"/>
                        <Separator />
                        <MenuItem Header="Add" Name="AddServerContextMenuItem" Click="AddServerContextMenuItem_Click"/>
                        <MenuItem Header="Edit" Name="EditerverContextMenuItem" Click="EditerverContextMenuItem_Click"/>
                        <Separator />
                        <MenuItem Header="Remove" Name="RemoveServerContextMenuItem" Click="RemoveServerContextMenuItem_Click"/>
                    </ContextMenu>
                </ListBox.ContextMenu>
            </ListBox>
        </GroupBox>

        <GroupBox Grid.Row="1">
            <Expander Header="Quick connect:" IsExpanded="False" Margin="0,5,0,0">
                <StackPanel Orientation="Vertical" Margin="0,5,0,0" >
                    <Controls:ServerModifyControl x:Name="ServerModify"/>

                    <Button Content="Connect" Name="ConnectButton" HorizontalAlignment="Center" Margin="0,5,0,5" Visibility="Visible" Click="ConnectButton_Click" />
                </StackPanel>
            </Expander>
        </GroupBox>
    </Grid>
</Controls:ControlBase>
